﻿/************************************************
 * Copyright (C) 2011 东北农业大学(NEAU)
 * 版权所有。
 * 文件名：ToStockRoomDetail.aspx.cs
 * 版本号：v1.0
 * 文件功能描述：出库管理信息的详细信息
 * 作者：侯建
 * 创建日期：2011.04.17
************************************************/
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Jxym.DBUtility;

namespace Jxym.wlkc2011.Module.Default.server.ToStockRoom
{
    public partial class ToStockRoomDetail : System.Web.UI.Page
    {
        
        MsSqlDal<model.ToStockRoom> icom = new MsSqlDal<model.ToStockRoom>();
        //MsSqlDal<model.ToStockRoom> icom = new MsSqlDal<model.ToStockRoom>();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.Params["id2"] != null && Request.Params["Type"] != null)
                {
                    int ID = Convert.ToInt32(Request.Params["id2"]);
                    model.ToStockRoom comModel = icom.GetModel("ID = " + ID, null);
                    lblToStockRoomName.Text = comModel.ToStockRoomName;
                    lblToStockRoomCount.Text = comModel.ToStockRoomCount.ToString();
                    lblToStockRoomPepole.Text = MyGet.GetUserInfoByID(comModel.ToStockRoomPepole).Name;
                    lblToStockRoomTime.Text = comModel.ToStockRoomTime.ToString();
                    lblToStockRoomContent.Text = comModel.ToStockRoomContent;
                    ExDiv.Visible = false;
                }
                else
                {
                    int ID = Convert.ToInt32(Request.Params["id2"]);
                    model.ToStockRoom comModel = icom.GetModel("ID = " + ID, null);
                    lblToStockRoomName.Text = comModel.ToStockRoomName;
                    lblToStockRoomCount.Text = comModel.ToStockRoomCount.ToString();
                    lblToStockRoomPepole.Text = MyGet.GetUserInfoByID(comModel.ToStockRoomPepole).Name;
                    lblToStockRoomTime.Text = comModel.ToStockRoomTime.ToString();
                    lblToStockRoomContent.Text = comModel.ToStockRoomContent;
                    lblToStockRoomExState.Text = comModel.ToStockRoomExState == 2 ? "通过" : "退回";
                    lblToStockRoomExContent.Text = comModel.ToStockRoomExContent;
                    lblToStockRoomExPepole.Text = MyGet.GetUserInfoByID(comModel.ToStockRoomExPepole).Name;
                }
            }
        }
    }
}